/*
 * @Copyright: Copyright (c) 2030 吴周海
 * @Author: wzh200x@126.com
 * @Date: 2025-10-20 16:51:57
 * @LastEditors: wzh200x@126.com
 * @LastEditTime: 2025-10-27 11:58:38
 * @FilePath: \gogamewebserver\goGameWebServer\api\admin\v1\admin.go
 * @Description: 文件功能描述
 */
package v1

import "github.com/gogf/gf/v2/util/gmeta"

type AdminQueryUserReq struct {
	gmeta.Meta  `path:"admin/query/user" method:"post" tags:"后台查询用户"`
	AccountName string `p:"accountName" validate:"required"`
}

type AdminQueryUserRes struct {
	gmeta.Meta  `mime:"application/json" example:"{accountId:0, accountName:'', id:0, name:'', data:'', createTime: '', updateTime: ''}"`
	AccountId   int    `json:"accountId" dc:"账号id"`
	AccountName string `json:"accountName" dc:"账号名称"`
	Id          int    `json:"id" dc:"角色id"`
	Name        string `json:"name" dc:"角色名称"`
	Data        string `json:"data" dc:"角色数据 json格式"`
	CreateTime  string `json:"createTime" dc:"创建时间"`
	UpdateTime  string `json:"updateTime" dc:"更新时间"`
}

type AdminUpdateUserReq struct {
	gmeta.Meta  `path:"admin/update/user" method:"post" tags:"后台修改用户"`
	AccountId   int    `p:"accountId" validate:"required" dc:"账号id"`
	AccountName string `p:"accountName" validate:"required" dc:"账号名称"`
	Id          int    `p:"id" validate:"required" dc:"角色id"`
	Name        string `p:"name" validate:"required" dc:"角色名称"`
	Data        string `p:"data" validate:"required" dc:"角色数据 json格式"`
}

type AdminUpdateUserRes struct {
	gmeta.Meta  `mime:"application/json" example:"{accountId:0, accountName:'', id:0, name:'', data:'', createTime: '', updateTime: ''}"`
	AccountId   int    `json:"accountId" dc:"账号id"`
	AccountName string `json:"accountName" dc:"账号名称"`
	Id          int    `json:"id" dc:"角色id"`
	Name        string `json:"name" dc:"角色名称"`
	Data        string `json:"data" dc:"角色数据 json格式"`
	CreateTime  string `json:"createTime" dc:"创建时间"`
	UpdateTime  string `json:"updateTime" dc:"更新时间"`
}

type AdminUpdateAvatarReq struct {
	gmeta.Meta        `path:"admin/update/avatar" method:"post" tags:"后台修改角色"`
	AccountName       string `p:"accountName" validate:"required" dc:"账号名称"`
	PassWord          string `p:"passWord" validate:"required" dc:"密码"`
	ThirdPlatformType int    `p:"thirdPlatformType" validate:"required" dc:"第三方平台类型"`
	ThirdPlatform     string `p:"thirdPlatform" dc:"第三方平台"`
	ThirdAccount      string `p:"thirdAccount" dc:"第三方账号"`
	AvatarData        string `p:"avatarData" validate:"required" dc:"角色数据 json格式"`
}

type AdminUpdateAvatarRes struct {
	gmeta.Meta `mime:"application/json" example:"{code:0, message:'', data:null}"`
}

type GameConfig struct {
	gmeta.Meta `mime:"application/json" example:"{id:0, name:'', type:0, platform:0, parentId:0, value: '', isActive: 0}"`
	Id         int    `json:"id" dc:"配置id"`
	Name       string `json:"name" dc:"配置名称"`
	Type       int    `json:"type" dc:"配置类型"`
	Platform   int    `json:"platform" dc:"平台类型"`
	ParentId   int    `json:"parentId" dc:"父级id"`
	Value      string `json:"value" dc:"配置值"`
	IsActive   int    `json:"isActive" dc:"是否启用"`
}

type AdminUpdateGameConfigReq struct {
	gmeta.Meta `path:"admin/update/config" method:"post" tags:"后台修改游戏配置"`
	Configs    []GameConfig `p:"configs" validate:"required"`
}

type AdminUpdateGameConfigRes struct {
	gmeta.Meta `mime:"application/json" example:"{code:0, message:'', data:{}}"`
}

type AdminUpdateServerKeyReq struct {
	gmeta.Meta `path:"admin/update/server_key" method:"post" tags:"后台修改服务器key"`
	Secret     string `p:"secret" validate:"required"`
}

type AdminUpdateServerKeyRes struct {
	gmeta.Meta `mime:"application/json" example:"{code:0, message:'', data:{}}"`
}
